mysql query in procedural php isn't returning single field